function route (path, file, name, children=null) {
  return {
    exact: true,
    path,
    name,
    children,
    component: () => import('@/pages/index/' + file),
    // beforeEnter: (to, from, next) => {//通过导航守卫阻止重复点击
    //   if(to && from && to.name == from.name){
    //     console.log("false")
    //     // next(false)

    //   }else{
    //     console.log("next")
    //     // next()
    //   }
    //   next()
    // }
  }
}
const indexRouter = [
      /* route("", "dataTables","demo"), */
      //echarts
      route("e-bar", "echarts/bar","eBar"),
      route("e-line", "echarts/line","eLine"),

      //datatables
      route("d-table", "datatables/table","dTable"),
      route("d-fixhead", "datatables/fixHeadTable","dFixHead"),

	  //ckeditor4
	  route("c-type1", "ckeditor/type1","cType1")

];

export default indexRouter
